﻿using T0yK4T.IO;

namespace ToyChat
{
    /// <summary>
    /// Used for user disconnected events
    /// </summary>
    /// <param name="user">The user that has disconnected</param>
    /// <param name="args">The <see cref="DisconnectedEventArgs"/> specified</param>
    public delegate void UserDisconnected(IUser user, DisconnectedEventArgs args);

    /// <summary>
    /// Used for connected events
    /// </summary>
    /// <param name="user">The user that has succesfully passed authentication and is now considered connected</param>
    public delegate void UserEventHandler(IUser user);

    /// <summary>
    /// Used for connected events
    /// </summary>
    /// <param name="sender">The <see cref="IClient"/> that is now connected</param>
    public delegate void ClientConnectedHandler(IClient sender);

    /// <summary>
    /// Used for disconnected events
    /// </summary>
    /// <param name="sender">The <see cref="IClient"/> that is now disconnected</param>
    /// <param name="reason">The reason the client was disconnected</param>
    public delegate void ClientDisconnectedHandler(IClient sender, DisconnectReason reason);
}